Repository navigation
fix(hooks): include configured hooks in scoped reads - #394
Merged
Merged
Conversation
StepenkoAnatoli
force-pushed
the
fix/issue-369-included-hooks
branch
from
October 13, 2026 13:14
0438aa5 to
99299ca
Compare
what changed: Scoped core.hooksPath reads now request Git include expansion. A disposable global-config fixture covers ordinary includes and gitdir conditional includes through preview, install, recorded hand-on and uninstall restoration. why: Git defaults scoped config reads to excludes, so a configured hooks folder was reported as unset and lost from the hand-on record. Request the effective included value with the existing scoped reader. No alternative design was set aside. what it touched: machine.mjs, doctor tests, architecture map, changelog and research-kit README inventory. Writes still use the existing Git config writer. what you verified: verified - red-first 66 passes and one expected include-read failure; then 90 doctor/machine tests passed with zero failures. Handoff OK and preflight PASS in this checkout. The required full offline suite runs in the commit gate before acceptance. Git's config documentation confirms scoped reads need --includes. what you got wrong and fixed: mistake - the first Windows fixture spelled the conditional Git path with Node realpath, which did not match Git's RUNNER~1 temp-path spelling. A follow-up using --absolute-git-dir targeted the wrong matching path. fix - derive the worktree root from `git rev-parse --show-toplevel`, so Git supplies the path spelling it uses for includeIf. verified - 90 doctor/machine tests passed, zero failures, in 108.5 seconds; the final fixture correction is queued for the full commit gate and supported CI.
StepenkoAnatoli
force-pushed
the
fix/issue-369-included-hooks
branch
from
October 13, 2026 13:58
99299ca to
cbc6e3c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
An existing hooks folder set through Git
includeorincludeIfwas read as unset during installation, losing the hand-on record. ScopedhooksPathreads now expand includes, preserving the configured folder through installation and removal.Fixes #369
what changed: Added
--includesto scoped hooksPath reads and regressions for ordinary and conditional global includes through preview, install, saved hand-on and restore.why: Git defaults includes off for scoped reads. Its git-config documentation documents this default and the explicit
--includesoption. No alternative design was set aside.what it touched:
machine.mjs, doctor tests, architecture, changelog and research-kit README inventory. No new interface.what you verified: verified - red-first 66 passes and one expected failure; then 90 doctor/machine tests passed, zero failures, in 108.5 seconds. Handoff OK and preflight PASS in this checkout. The standard full offline commit gate accepted
cbc6e3c5890788cb434245b3f13134887bdda474.what you got wrong and fixed: mistake - the first Windows fixture used Node's realpath spelling for a conditional include, which still differed from Git's path spelling on the hosted runner. fix - derive the repository root with
git rev-parse --show-toplevel, which returns the path Git itself matches. The final focused tests and full commit gate passed.